# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Alexandre Filgueira <alexfilgueira@antergos.com>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=cinnamon-session
pkgver=6.0.0
pkgrel=1
pkgdesc="The Cinnamon Session Handler"
arch=('loong64' 'x86_64')
url="https://github.com/linuxmint/${pkgname}"
license=('GPL' 'LGPL')
depends=('cinnamon-desktop' 'libsm' 'libcanberra' 'xapps')
optdepends=('cinnamon-translations: i18n')
makedepends=('meson' 'samurai' 'xtrans')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('413146bfa74ea61af70e064fa55aec2824b36735f9d6ec030da7154319f0144c')
b2sums=('12a8f85b568eb97fc478383db5ea0c19fa1c4b9feae734158ce4932640b92eece3684b69cb321f2a06047b3821ed3a277aa529a3c6a6731ce56b7f43aac746cb')

build() {
    mkdir -p ${pkgname}-${pkgver}/build
    cd ${pkgname}-${pkgver}/build

    meson --prefix=/usr \
          --libexecdir=lib/${pkgname} \
          --buildtype=plain \
          ..
    samu
}

package() {
    cd ${pkgname}-${pkgver}/build

    DESTDIR="${pkgdir}" samu install
}
